﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using System.IO;
using System.Text;
using IMIForUnity;

namespace IMIForUnity
{
    public class ImiGesturePro : ImiGesture
    {
        public GestureType gestureType;
        public static float fixPosZ;
        public static float fixHipPosY;

        public ImiGesturePro(GestureType type)
        {
            this.gestureType = type;
        }

        public override State CheckGesture(ImiPlayerInfo playerinfo, double timestamp)
        {
            return State.FINISHED;
        }


    public enum GestureType
    {
        IMI_GESTURE_NONE,

        IMI_GESTURE_LEFT_HAND_WAVE,                         // 1 左手挥动
        IMI_GESTURE_RIGHT_HAND_WAVE,                        // 2 右手挥动

        IMI_GESTURE_LEFT_HAND_SWIPE_LEFT,                   // 3 左手往左挥
        IMI_GESTURE_LEFT_HAND_SWIPE_RIGHT,                  // 4 左手向右挥
        IMI_GESTURE_RIGHT_HAND_SWIPE_LEFT,                  // 5 右手向左挥
        IMI_GESTURE_RIGHT_HAND_SWIPE_RIGHT,                 // 6 右手往右挥

        IMI_GESTURE_LEFT_HAND_PUSH,                         // 7 左手向前推
        IMI_GESTURE_RIGHT_HAND_PUSH,                        // 8 右手向前推
        IMI_GESTURE_LEFT_HAND_HOOKUP,                       // 9 左手上勾
        IMI_GESTURE_RIGHT_HAND_HOOKUP,                      // 10 右手上勾

        IMI_GESTURE_LEAN_FORWARD,                           // 11 身体前倾(受摄像头摆放角度影响)
        IMI_GESTURE_LEAN_BACKWARD,                          // 12 身体后仰(受摄像头摆放角度影响)
        IMI_GESTURE_LEAN_LEFT,                              // 13 身体左倾
        IMI_GESTURE_LEAN_RIGHT,                             // 14 身体右倾

        IMI_GESTURE_JUMP,                                   // 15 跳跃（需要至少检测到膝盖）
        IMI_GESTURE_SQUAT,                                  // 16 蹲下
        IMI_GESTURE_WING,                                   // 17 双手同时上下挥动
        IMI_GESTURE_RUN,                                    // 18 双臂前后摆动

        IMI_GESTURE_ZOOM_OUT,                               // 19 缩小
        IMI_GESTURE_ZOOM_IN,                                // 20 放大

        IMI_GESTURE_LEFT_HAND_OVER_HEAD,                    // 21 左手举过头顶，右手放下
        IMI_GESTURE_RIGHT_HAND_OVER_HEAD,                   // 22 右手举过头顶，左手放下
        IMI_GESTURE_BOTH_HANDS_OVER_HEAD,                   // 23 双手举过头顶
        IMI_GESTURE_BOTH_HANDS_BACK,                        // 24 双手放在身体后

        IMI_GESTURE_LEFT_ARM_PAUSE,                         // 25 左臂与身体保持45度
        IMI_GESTURE_RIGHT_ARM_PAUSE,                        // 26 右臂与身体保持45度
        IMI_GESTURE_LEFT_ARM_FORWARD,                       // 27 左臂前举
        IMI_GESTURE_RIGHT_ARM_FORWARD,                      // 28 右臂前举
        IMI_GESTURE_BOTH_ARMS_FORWARD,                      // 29 双臂前举

        IMI_GESTURE_LEFT_ARM_LATERAL_RAISE,                 // 30 左臂侧平举（右臂需放下）
        IMI_GESTURE_RIGHT_ARM_LATERAL_RAISE,                // 31 右臂侧平举（左臂需放下）
        IMI_GESTURE_BOTH_ARMS_LATERAL_RAISE,                // 32 双手侧平举
        IMI_GESTURE_RIGHT_ARM_LATERAL_RAISE_LEFT_ARM_UP,    // 33 右臂侧平举，左臂上举
        IMI_GESTURE_RIGHT_ARM_UP_LEFT_ARM_LATERAL_RAISE,    // 34 左臂侧平举，右臂上举

        IMI_GESTURE_LEFT_KNEE_KICK,                         // 35 左膝踢
        IMI_GESTURE_RIGHT_KNEE_KICK,                        // 36 右膝踢
        IMI_GESTURE_LEFT_KNEE_LIFT,                         // 37 左膝抬起（静态）
        IMI_GESTURE_RIGHT_KNEE_LIFT,                        // 38 右膝抬起（静态）

        IMI_GESTURE_LEFT_FOOT_KICK,                         // 39 左脚踢（需要检测到左脚）
        IMI_GESTURE_RIGHT_FOOT_KICK,                        // 40 右脚踢（需要检测到右脚）

        IMI_GESTURE_BODY_MOVE_FORWARD,                      // 41 身体往前走
        IMI_GESTURE_BODY_MOVE_BACKWARD,                     // 42 身体往后走
        IMI_GESTURE_BODY_MOVE_LEFT,                         // 43 身体往左走
        IMI_GESTURE_BODY_MOVE_RIGHT,                        // 44 身体往右走

        IMI_GESTURE_TENNIS_SWIPE_LEFT,                      // 45 网球游戏向左挥
        IMI_GESTURE_TENNIS_SWIPE_RIGHT,                     // 46 网球游戏向右挥
        IMI_GESTURE_APPLAUSE,                               // 47 鼓掌（双手分开到合并）
        IMI_GESTURE_BOWLING_THROW,                          // 48 保龄球扔球
        IMI_GESTURE_DEFENSE,                                // 49 防御(双手放在面前)
        IMI_GESTURE_DRIVE,                                  // 50 开车
        IMI_GESTURE_RIGHT_HAND_THROW_DART,                  // 51 右手扔飞镖
        IMI_GESTURE_BASEBALL_HITTING,                       // 52 棒球击球

        IMI_GESTURE_COUNT
    }


    }

}
